<template>
	<div>
		<h5>发表新话题</h5>
		<group>
			<x-textarea placeholder="标题" :max='30' :rows='1' v-model='title'></x-textarea>
			<x-textarea placeholder="内容" :max='300' :rows='6' v-model='content'></x-textarea>
		</group>
		<x-button type="primary" @click.native='addt'>
			添加新话题
		</x-button>
	</div>
</template>

<script>
	//引入
	import {
		XTextarea,
		Group,
		XInput,
		XButton
	} from 'vux'
	export default {//注册
		components: {
			XTextarea,
			Group,
			XButton
		},
		data:function(){
			return{
				title:'',
				content:''
			}
		},
		methods:{
			addt:function(){
				console.log(this.title);
				console.log(this.content);
				//跳转页面
				this.$router.replace('/topiclist/dev');
			}
		}
	}
</script>

<style>
</style>
